﻿Imports System.Data.SqlClient

Public Class cn_seller_show
    Inherits System.Web.UI.Page
    Dim objrd As SqlDataReader = Nothing

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim objdt = New GetData
        Dim ps = New PreparedStatement("select * from Merchants order by merchant_name")

        Dim conn As SqlConnection = objdt.getConn()
        objrd = objdt.dr(ps, "", conn, objrd)
        Dim strCom As String
        strCom = ""
        If objrd.HasRows Then

            While (objrd.Read())
                strCom &= "<div class=""itemBox"">" & _
                              "<div class=""companyLocationStyle loaction"">" & _
                                  "<img style=""border: 0pt none; vertical-align: top;"" alt=""country flag"" src=""../assets/us.gif""/>" & _
                                  "<span style=""display:block"">  United States</span>" & _
                              "</div>" & _
                              "<div class=""companyShortInfo"">" & _
                                  "<div class=""companyName"">" & _
                                      "<a target=""_blank"" title=""Georgia Company"" dot=""area=ml2&type;=pttl&value;="" href=""cn_sellerinfo.aspx?comId=" & objrd.Item("company_id") & """ > " & _
                                            objrd.Item("merchant_name") & _
                                      "</a>" & _
                                  "</div>" & _
                                  "<div class=""companyDescription"">" & _
                                     "产品或服务 : " & objrd.Item("company_desc") & _
                                 "</div>" & _
                              "</div>" & _
                          "</div>"
            End While

        End If
        objdt.closeConn(conn)
        companyList.InnerHtml = strCom
    End Sub

End Class